ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
CRC.c File Reference

MPC5604P's CRC hardware module driver. More...

#include "derivative.h"
#include "CRC.h"
#include "EDMA.h"

Functions

void vfnInitCRC (uint8_t u8Instance, uint32_t u32Remainder)
 Makes sure that a CRC engine is empty and ready for computation.
uint8_t u8fnCRC (const uint8_t *pu8StartAddress, const uint32_t u32NOfBytes, uint32_t *pu32Result, const uint32_t u32Remainder, const uint8_t u8DMAChannel, const uint8_t u8CRCConfig)
 Reinitializes a CRC instance for computation, configures DMA for followed operation, and launches the operation.
void vfnCRC0Isr (void)
 True DMA Isr, it clears the DMA Isr flag and calls common code for all CRC Isrs.
void vfnCRC1Isr (void)
 True DMA Isr, it clears the DMA Isr flag and calls common code for all CRC Isrs.

Detailed Description

MPC5604P's CRC hardware module driver.

Copyright (C) 2011 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor
SASD Automotive
r11515
Version:
Date:
Warning:
(If needed)

History:


Function Documentation

uint8_t u8fnCRC ( const uint8_t *  pu8StartAddress,
const uint32_t  u32NOfBytes,
uint32_t *  pu32Result,
const uint32_t  u32Remainder,
const uint8_t  u8DMAChannel,
const uint8_t  u8CRCConfig 
)

Reinitializes a CRC instance for computation, configures DMA for followed operation, and launches the operation.

Parameters:
pu32StartAddress,:Pointer to the first byte that will be computed
u32NOfBytes,:Number of bytes to be included in computation.
pu32Result,:Pointer to location where the result will be stored once the operation is done.
u32Remainder,:Starting value used to compute. Sometimes fixed by the algorithm, as is the case for CRC32 (0xFFFFFFFF).
u8DMAChannel,:DMA channel used for this operation.
u8CRCConfig,:Index of configuration used for the module as listed in DEFAULT_CRC_CONFIG_INDECES with relation to cau8CRCConfigs.
Returns:
CLEAR if everything went according to plan, TRUE if the DMA channel hasn't been serviced (pending computation).
void vfnCRC0Isr ( void  )

True DMA Isr, it clears the DMA Isr flag and calls common code for all CRC Isrs.

Returns:
Void.
void vfnCRC1Isr ( void  )

True DMA Isr, it clears the DMA Isr flag and calls common code for all CRC Isrs.

Returns:
Void.
void vfnInitCRC ( uint8_t  u8Instance,
uint32_t  u32Remainder 
)

Makes sure that a CRC engine is empty and ready for computation.

Parameters:
u8Instance,:Either 0 or 1 for MPC5604P.
u32Remainder,:Starting value used to compute. Sometimes fixed by the algorithm, as is the case for CRC32 (0xFFFFFFFF).
Returns:
void